﻿// hidden field
function showTip() {
    $("#money").tinyTips({
        content: "click to show the source",
        style: "blue"
    });
}

function changeValue() {
    $("#hidden_val").keyup(function () {
        $("#true_val").val($("#hidden_val").val());
    });
}

// global
function changeTab() {
    $('#pre').click(function () {
        $('#preContent').show();
        $('#teachContent').hide();
        $('#hintContent').hide();
        $('#labContent').hide();
    });

    $('#teach').click(function () {
        $('#preContent').hide();
        $('#teachContent').show();
        $('#hintContent').hide();
        $('#labContent').hide();
    });

    $('#lab').click(function () {
        $('#preContent').hide();
        $('#teachContent').hide();
        $('#hintContent').hide();
        $('#labContent').show();
    });

    $('#hint').click(function () {
        $('#preContent').hide();
        $('#teachContent').hide();
        $('#hintContent').show('slow');
        $('#labContent').show();
    });
}

$(document).ready(function () {
    changeTab();
    showTip();
    changeValue();
    eventHandler();
});